package leetcode;


import java.io.BufferedReader;
import java.io.InputStreamReader;

/**
 * create by duanx 2022/2/7
 *
 * @classname: Test3
 * @author: duanx
 * @date: 2022/2/7 9:22
 **/
public class Test17 {

    public static int find(int[] flower) {
        int[] times = new int[flower.length];
        for (int i = 0; i < flower.length; i++) {
            int min = flower[i];
            int t = 1;
            for (int j = i; j < flower.length; j++) {
                if (flower[j] > min) {
                    min = flower[j];
                    t = t + 1;
                }
            }
            times[i] = t;
        }
        int max = times[0];
        for (int i = 0; i < times.length; i++) {
            if (times[i] > max) {
                max = times[i];
            }
        }
        return max;
    }


    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str1;
        while ((str1 = br.readLine()) != null) {
            int t = Integer.parseInt(str1);
            String input = br.readLine();
            String[] inputs = input.split(" ");
            int[] flower = new int[inputs.length];
            for (int i = 0; i < inputs.length; i++) {
                flower[i] = Integer.parseInt(inputs[i]);
            }
            int i = find(flower);
            System.out.println(i);
        }
    }

}
